<?php
if ($_REQUEST) {
    $a = $_REQUEST['username'];
    $mod = $_REQUEST['mod'];
    require_once 'dbconnect.php';
    if ($mod == 'ki') {
        mysql_query("UPDATE users SET status='-1' WHERE username='$a'") or die(mysql_error());
        $kiir = mysql_fetch_array(mysql_query("SELECT status FROM users WHERE username='$a'")) or die(mysql_error());
        if ($kiir['status'] == -1) {
            echo 'bannolva';
        }
    } elseif ($mod == 'be') {
        mysql_query("UPDATE users SET status='0' WHERE username='$a'") or die(mysql_error());
        $kiir = mysql_fetch_array(mysql_query("SELECT status FROM users WHERE username='$a'")) or die(mysql_error());
        if ($kiir['status'] == 0) {
            echo 'offline';
        }
    }
}
?>